package com.bwie.remote;


import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
//import com.bwie.remote.factory.RemoteSystemFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * 系统服务远程调用的Http请求的客户端
 */
@FeignClient(name = "bwie-system")
public interface RemoteSystemService {

    /**
     * 查询账号
     * @param account
     * @return
     */
    @GetMapping("/system/loginByAccount/{account}")
    public Result<User> loginByAccount(@PathVariable(value = "account") String account);

    /**
     * 添加账号
     */
    @PostMapping("/system/add")
    public Result<String> add(@RequestBody User user);

    /**
     * 查询手机号
     */
    @GetMapping("/system/findTel/{phone}")
    public Result<User> findTel(@PathVariable(value = "phone") String phone);
}
